import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.jws.soap.SOAPBinding.Style;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.text.StyleConstants;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import java.awt.Font;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import com.jgoodies.forms.factories.FormFactory;
import javax.swing.JTextPane;
import java.awt.GridLayout;
import javax.swing.JSplitPane;
import java.awt.SystemColor;
import javax.swing.UIManager;
import java.awt.Component;
import javax.swing.Box;
import javax.swing.JSeparator;
import javax.swing.JScrollBar;
import javax.swing.JTextArea;
import java.awt.Color;
import java.awt.event.ActionListener;

import javax.swing.JTextField;


public class BotView extends JDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private final JPanel contentPanel = new JPanel();
	private JTextField textField;
	private JButton okButton;
	private JButton cancelButton;
	private JLabel lblNewLabel_1;


	/**
	 * Create the dialog.
	 */
	public BotView() {
		setBounds(100, 100, 583, 417);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		{
			JLabel lblWelcomeToPurity = new JLabel("Welcome to Purity Bot!");
			lblWelcomeToPurity.setFont(new Font("Tahoma", Font.PLAIN, 25));
			lblWelcomeToPurity.setHorizontalAlignment(SwingConstants.CENTER);
			lblWelcomeToPurity.setBounds(150, 0, 256, 67);
			contentPanel.add(lblWelcomeToPurity);
		}
		{
			JLabel lblDevelopedByRyan = new JLabel("Developed by Ryan Fahsel");
			lblDevelopedByRyan.setHorizontalAlignment(SwingConstants.CENTER);
			lblDevelopedByRyan.setBounds(206, 59, 150, 14);
			contentPanel.add(lblDevelopedByRyan);
		}
		{
			JLabel lblVersion = new JLabel("Version: 1.0");
			lblVersion.setHorizontalAlignment(SwingConstants.CENTER);
			lblVersion.setBounds(227, 78, 119, 14);
			contentPanel.add(lblVersion);
		}
		
		JPanel inputSection = new JPanel();
		inputSection.setBounds(10, 102, 547, 261);
		contentPanel.add(inputSection);
		inputSection.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Please Read the Following Warning Below:");
		lblNewLabel.setBounds(0, 0, 547, 20);
		lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
		inputSection.add(lblNewLabel);
		
		JTextPane txtpnFleeFromSexual = new JTextPane();
		txtpnFleeFromSexual.setEditable(false);
		txtpnFleeFromSexual.setBounds(0, 35, 127, 202);
		txtpnFleeFromSexual.setBackground(UIManager.getColor("Button.background"));
		txtpnFleeFromSexual.setFont(new Font("Tahoma", Font.ITALIC, 9));
		txtpnFleeFromSexual.setText("Flee from sexual immorality.\r\n Every other sin a person\r\n commits is outside the body,\r\n but the sexually immoral \r\nperson sins against his own \r\nbody. Or do you not know \r\nthat your body is a temple\r\n of the Holy Spirit within\r\n you, whom you have from \r\nGod? You are not your own,\r\n for you were bought with a\r\n price. So glorify God in your\r\n body.\r\n1 Corinthians 6:18-20 ");
		inputSection.add(txtpnFleeFromSexual);
		{
			JTextPane txtpnNoTemptationHas = new JTextPane();
			txtpnNoTemptationHas.setEditable(false);
			txtpnNoTemptationHas.setText("No temptation has overtaken \r\nyou that is not common to man. \r\nGod is faithful, and he will not\r\n let you be tempted beyond \r\nyour ability, but with the \r\ntemptation he will also \r\nprovide the way of escape, \r\nthat you may be able to\r\nendure it.\r\nvote.\r\n\r\n1 Corinthians 10:13 ");
			txtpnNoTemptationHas.setFont(new Font("Tahoma", Font.ITALIC, 9));
			txtpnNoTemptationHas.setBackground(SystemColor.menu);
			txtpnNoTemptationHas.setBounds(402, 31, 145, 202);
			inputSection.add(txtpnNoTemptationHas);
		}
		
		JTextArea txtrDDD = new JTextArea();
		txtrDDD.setEditable(false);
		txtrDDD.setBackground(UIManager.getColor("Button.background"));
		txtrDDD.setForeground(new Color(255, 0, 0));
		txtrDDD.setFont(new Font("Arial", Font.PLAIN, 12));
		txtrDDD.setText("Please only use this application for\r\n inappropriate material. It will forever\r\n block the site. This cannot be undone\r\nwithout me!");
		txtrDDD.setBounds(144, 31, 248, 60);
		inputSection.add(txtrDDD);
		
		JLabel lblEnterTheSite = new JLabel("Enter the site url (www.site.com):");
		lblEnterTheSite.setHorizontalAlignment(SwingConstants.CENTER);
		lblEnterTheSite.setBounds(154, 107, 201, 14);
		inputSection.add(lblEnterTheSite);
		
		textField = new JTextField();
		textField.setBounds(137, 135, 255, 20);
		inputSection.add(textField);
		textField.setColumns(10);
		
		lblNewLabel_1 = new JLabel("\r\n");
		lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 9));
		lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);
		lblNewLabel_1.setForeground(new Color(0, 128, 0));
		lblNewLabel_1.setBounds(147, 166, 247, 14);
		inputSection.add(lblNewLabel_1);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				okButton = new JButton("Block");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				cancelButton = new JButton("Close");
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
		this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		this.setVisible(true);
	}
	public JTextField getSite() {
		return textField;
	}
	
	public void addActionListener(ActionListener a)
	{
		okButton.addActionListener(a);
		cancelButton.addActionListener(a);
	}
	public JLabel getMessage() {
		return lblNewLabel_1;
	}
}
